//
//  MenuAppDelegate.m
//  HandyDialer
//
//	Developed by Team Synergy
//  Created by Jordan Tseng on 10/29/11.
//  Coders: Jacky Li and Jordan Tseng 
//  Graphic Designer: Derek Fong
//  Developers: Brad Lisson, Derek Fong, Jacky Li, Jeremy Gangoso, Jordan Tseng
//  Copyright HandyDialer 2011. All rights reserved.


#import "MenuAppDelegate.h"
#import "MenuViewController.h"


@implementation MenuAppDelegate
@synthesize window;
@synthesize viewController;


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{  
    // Opens main menu  
    
	defaults = [NSUserDefaults standardUserDefaults];
	//call log entry initialization
    if ([defaults mutableArrayValueForKey:@"CallLog"] == nil)
    {
    
        [defaults setObject:[NSMutableArray new] forKey:@"CallLog"];
        [defaults synchronize];
    }
    ;
	if ([defaults floatForKey:@"Speed"] == 0)
	{


		[defaults setFloat:1.0 forKey:@"Speed"];
		[defaults synchronize];
	}
	
	if ([defaults stringForKey:@"Highlight"] == nil)
	{
		[defaults setObject:@"blue" forKey:@"Highlight"];
		[defaults synchronize];
	}
	
	if ([defaults stringForKey:@"Theme"] == nil)
	{
		[defaults setObject:@"steel" forKey:@"Theme"];
		[defaults synchronize];
	}



    //self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
	self.viewController = [[MenuViewController alloc] initWithNibName:@"MenuView" bundle:nil];
	self.window.rootViewController = self.viewController;
    [self.window makeKeyAndVisible];
    return true;
}

- (void)dealloc
{
	[window release];
    [super dealloc];
}


@end
